<div class="studentgroups form">
<?php echo $this->Form->create('Ovir');?>
	<fieldset>
		<legend><?php echo __('Add Studentgroup'); ?></legend>
	<?php
		echo $this->Form->input('profession_id', array('empty' => 'Выберите факультет'));
		echo $this->Form->input('course_id');
		$this->Js->get('#StudentgroupProfessionId');
		$this->Js->event('change', $this->Js->request(array('controller'=>'ovirs', 'action'=>'update_course'), 
		array(
				'update'=>'#StudentgroupCourseId',
				'async' => true,
				'method' => 'Post',
				'dataExpression'=>true,
				'data'=> $this->Js->serializeForm(array('isForm' => true,'inline' => true))
		)));
		
		echo $this->Form->input('learningform_id');
		echo $this->Form->input('learningtype_id');
		echo $this->Form->input('number');
		echo $this->Form->input('name');
		
	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit'));?>
</div>